package com.webex.ta.hydra.gui.macro;

/**
 * Created by Cisco WebEx.
 * User: vegaz
 * Date: 2010-9-14
 * Time: 12:01:58
 */
public class MacroIdGenerator {
    private static MacroIdGenerator instance;

    private long id = 0;

    private MacroIdGenerator() {}

    public static MacroIdGenerator getInstance() {
        if (instance == null)
            instance = new MacroIdGenerator();
        return instance;
    }

    public synchronized long nextId() {
        id ++;
        return id;
    }

    public void reset() {
        id = 0;
    }
}
